<!DOCTYPE HTML>
<html>

<head>
    <include file="Public/head" />
</head>

<body>
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>
        菜单管理
        <span class="c-gray en">&gt;</span>
        菜单
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
            title="刷新">
            <i class="Hui-iconfont">&#xe68f;</i>
        </a>
    </nav>
    <div class="page-container">
        <form class="form form-horizontal" id="form-article-add" action="{:U('Menu/add')}" method="POST">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    选择上级菜单：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    {$tree_select}
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    菜单名称：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" id="website-Keywords" name="name" placeholder="菜单名称" value="{$Menu.name}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    排序：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="number" id="website-uploadfile" name="sort" placeholder="排序" value="{$Menu.sort}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    是否显示：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <span class="select-box" style="width:150px">
                        <select class="select" name="show" size="1">
                            <option value="1" selected>显示</option>
                            <option value="0">隐藏</option>
                        </select>
                    </span>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    菜单模块：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" id="website-description" name="model" placeholder="菜单模块" value="{$Menu.model}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    菜单控制器：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" id="website-static" name="controller" placeholder="菜单控制器" value="{$Menu.controller}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    菜单方法：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" id="website-uploadfile" name="action" placeholder="菜单方法" value="{$Menu.action}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">
                    <span class="c-red">*</span>
                    菜单图标：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" id="website-copyright" name="icon" placeholder="菜单图标" value="{$Menu.icon}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    <button class="btn btn-primary radius" type="submit">
                        <i class="Hui-iconfont">&#xe632;</i> 保存</button>
                </div>
            </div>
        </form>
    </div>
    <include file="Public/script" />
</body>
<script>
    $(function () {
        var pid = '{$Menu.parent_id}';
        if (pid) {
            $('#menu_tree').val(pid);
        }else{
            $('#menu_tree').val(0);
        }
    });
</script>

</html>